package com.xbongbong.saas.domain.dao;

import com.xbongbong.saas.domain.entity.DingBundleLogEntity;
import com.xbongbong.saas.domain.entity.DingBundleUserEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * @author chenshan
 * @Since 2020-09-01 11:19
 */
@Repository
@Mapper
public interface DingBundleLogDao {
	Integer insert(DingBundleLogEntity dingBundleLogEntity);

	void insertBatch(List<DingBundleLogEntity> dingBundleLogList);

	Integer update(DingBundleLogEntity dingBundleLogEntity);

	Integer deleteByKey(@Param("key") Long key, @Param("corpid") String corpid);

	DingBundleUserEntity getByKey(@Param("key") Long key, @Param("corpid") String corpid);

	List<DingBundleUserEntity>	findEntitys(@Param("param") Map<String, Object> param);

	Integer getEntitysCount(@Param("param") Map<String, Object> param);

	Integer deleteByIdIn(@Param("idIn") List<Long> idIn, @Param("corpid") String corpid);
	
	DingBundleLogEntity getEntityByUserId(@Param("userId") String userId, @Param("corpid") String corpid);
}